<!--
	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
-->

<template>
	<div>
		<router-view></router-view>
	</div>
</template>

<script>

export default {
	name: 'App',
	// 这里面是防止刷新页面vuex数据丢失
	created() {
		if(localStorage.getItem("loged")){
			this.$store.replaceState(
				Object.assign({},this.$store.state,JSON.parse(window.localStorage.getItem("store")))
			);
		}else {
			window.localStorage.removeItem('store');
		}
		//在页面刷新时将vuex里的信息保存到localStorage里
		window.addEventListener("beforeunload",()=>{
			window.localStorage.setItem("store",JSON.stringify(this.$store.state));
		});
	},
}
</script>

<style>
*{
	margin: 0;
	padding: 0;
}
</style>
<!-- 引入皮肤 -->
<style src="@/assets/css/globalColor.css"></style>